<div class="text-center">
    <ul class="pagination" ng-if="1 < pages.length">
        <li ng-if="boundaryLinks" ng-class="{ disabled : pagination.current == 1 }">
            <a href="" ng-click="setCurrent(1)">&laquo;</a>
        </li>
        <li ng-if="directionLinks" ng-class="{ disabled : pagination.current == 1 }" class="ng-scope">
            <a href="" ng-click="setCurrent(pagination.current - 1)" class="ng-binding">&lsaquo;</a>
        </li>
        <li ng-repeat="pageNumber in pages track by $index" ng-class="{ active : pagination.current == pageNumber, disabled : pageNumber == '...' }">
            <a href="" ng-click="setCurrent(pageNumber)">{{ pageNumber }}</a>
        </li>

        <li ng-if="directionLinks" ng-class="{ disabled : pagination.current == pagination.last }" class="ng-scope">
            <a href="" ng-click="setCurrent(pagination.current + 1)" class="ng-binding">&rsaquo;</a>
        </li>
        <li ng-if="boundaryLinks"  ng-class="{ disabled : pagination.current == pagination.last }">
            <a href="" ng-click="setCurrent(pagination.last)">&raquo;</a>
        </li>
    </ul>
</div>